<template>
	<view>
		<view class="fixedit" :style="{top:top}">
			<view class="fhead">
				<text>由中国医学科学院医学信息研究所研发</text>
			</view>
			<graceNavBar :items="navItems" 
			lineHeight="80rpx" :isCenter="true" 
			:currentIndex="cateCurrentIndex" :size="0" padding="20rpx" 
			activeLineBg="#3688FF" textAlign="center"
			activeColor="#3688FF" activeLineWidth="100%" activeLineHeight="2rpx" 
			:margin="10" @change="navChange"></graceNavBar>
		</view>
		<view style="height:100rpx;"></view>
		<!-- 文章内容区 -->
		<view class="grace-news-list" style="width:94%; padding:5px 3%;">
			<view class="fhead2"><text>共 {{visitCount}}</text><text style="margin: 0 10rpx;">人次浏览</text></view>
			<view v-show="cateCurrentIndex==0" class="news-item">
				<view>
					<image style="width: 49%; height: 24px;" src="/static/nstilogo.png"></image>
					<image style="width: 49%; height: 24px; margin-left: 5px;" src="/static/ncmi-logo.png"></image>
				</view>
				<view>
					<image style="width: 100%; height: 300rpx;" src="/static/banner3.jpg"></image>
				</view>
				
				<view style="text-align: center;">
					<button :type="aindex==0?'primary':'default'" size="mini" style="width: 50%;" @tap="changeAIndex(0)">国内疫情</button>
					<button :type="aindex==1?'primary':'default'" size="mini" style="width: 50%;" @tap="changeAIndex(1)">国际疫情</button>
				
				</view>
				<view v-if="aindex==0">
					<view class="ghead"><text class="ghead-left">全国</text><text>截至 {{lastUpdateTime}}(北京时间) 数据统计</text></view>
					<view class="grace-nowrap">
						<view class="gtop grace-flex1">
							<view class="gtop-head">较上日<text style="color: #F55253;">{{'+'+chinaAdd.confirm}}</text></view>
							<view class="gtop-desc"><text style="color: #F55253;">{{chinaTotal.confirm}}</text></view>
							<view class="gtop-title">全国确诊</view>
						</view>
						<view class="gtop grace-flex1">
							<view class="gtop-head">较上日<text style="color: #FF961E;">{{'+'+chinaDayAdd.suspect}}</text></view>
							<view class="gtop-desc"><text style="color: #FF961E;">{{chinaTotal.suspect}}</text></view>
							<view class="gtop-title">疑似病例</view>
						</view>
						<view class="gtop grace-flex1">
							<view class="gtop-head">较上日<text style="color: #178B50;">{{'+'+chinaAdd.heal}}</text></view>
							<view class="gtop-desc"><text style="color: #178B50;">{{chinaTotal.heal}}</text></view>
							<view class="gtop-title">治愈人数</view>
						</view>
						<view class="gtop grace-flex1">
							<view class="gtop-head">较上日<text style="color: #66666c;">{{'+'+chinaAdd.dead}}</text></view>
							<view class="gtop-desc"><text style="color: #66666c;">{{chinaTotal.dead}}</text></view>
							<view class="gtop-title">死亡人数</view>
						</view>
					</view>
					<!-- <view style="margin: 20rpx;background-color: #FFEEC1;padding: 15rpx;" @click="goAreaList()">
						<view><text style="font-size: 30rpx;">全国医疗救治发热门诊</text></view>
						<view><text style="font-size: 22rpx;">已更新全国{{hospitals.h0}}家门诊信息</text></view>
						<view><image src="../../static/arrow-fill-right.png" style="width: 40rpx;height: 40rpx;position: absolute;right: 100rpx;margin-top: -54rpx;"></image></view>
					</view> -->
					<view style="font-size: 30rpx; font-weight: bold;"><text style="background-color: #007AFF; margin-right: 10rpx; padding: 0 4rpx;"></text>疫情分布</view>
					<view class="echartsIn">
						<mpvue-echarts lazyLoad :echarts="echarts" :onInit="mapInit" ref="echarts1" canvasId="map" />
					</view>
					<view style="font-size: 30rpx; font-weight: bold;"><text style="background-color: #007AFF; margin-right: 10rpx; padding: 0 4rpx;"></text>全国疫情趋势图</view>
					<view class="echartsIn">
						<mpvue-echarts lazyLoad :echarts="echarts" :onInit="lineInit" ref="echarts2" canvasId="line1" />
					</view>	
					<view class="echartsIn">
						<mpvue-echarts lazyLoad :echarts="echarts" :onInit="lineInit2" ref="echarts3" canvasId="line2" />
					</view>	
					
					<view style="font-size: 30rpx; font-weight: bold;"><text style="background-color: #007AFF; margin-right: 10rpx; padding: 0 4rpx;"></text>病例</view>
					<view class="content">
						<view class="grace-table grace-margin-top">
							<view class="grace-theader grace-bg-light-blue">
								<text class="grace-td grace-bold">地区</text>
								<text class="grace-td grace-bold" style="background-color: #005dff;">新增确诊</text>
								<text class="grace-td grace-bold" style="background-color: #F55253;">累计确诊</text>
								<text class="grace-td grace-bold" style="background-color: #178B50;">治愈</text>
								<text class="grace-td grace-bold" style="background-color: #66666c;">死亡</text>
							</view>
							<view class="grace-tbody" v-for="(item, index) in tableList" :key="index">
								<text class="grace-td">{{item.name}}</text>
								<text class="grace-td">{{item.addconfirm}}</text>
								<text class="grace-td">{{item.confirm}}</text>
								<text class="grace-td">{{item.cure}}</text>
								<text class="grace-td">{{item.death}}</text>
							</view>
						</view>
					</view>
				</view>
				<view v-if="aindex==1">
					<view class="ghead"><text class="ghead-left">世界</text><text>截至 {{lastUpdateTime}}(北京时间) 数据统计</text></view>
					<view class="grace-nowrap">
						<view class="gtop grace-flex1">
							<view class="gtop-head">较上日<text style="color: #F23A1D;">{{'+'+globalStatis.nowConfirmAdd}}</text></view>
							<view class="gtop-desc"><text style="color: #F23A1D;">{{globalStatis.nowConfirm}}</text></view>
							<view class="gtop-title">现有确诊</view>
						</view>
						<view class="gtop grace-flex1">
							<view class="gtop-head">较上日<text style="color: #F55253;">{{'+'+globalStatis.confirmAdd}}</text></view>
							<view class="gtop-desc"><text style="color: #F55253;">{{globalStatis.confirm}}</text></view>
							<view class="gtop-title">累计确诊</view>
						</view>
						<view class="gtop grace-flex1">
							<view class="gtop-head">较上日<text style="color: #178B50;">{{'+'+globalStatis.healAdd}}</text></view>
							<view class="gtop-desc"><text style="color: #178B50;">{{globalStatis.heal}}</text></view>
							<view class="gtop-title">治愈人数</view>
						</view>
						<view class="gtop grace-flex1">
							<view class="gtop-head">较上日<text style="color: #66666c;">{{'+'+globalStatis.deadAdd}}</text></view>
							<view class="gtop-desc"><text style="color: #66666c;">{{globalStatis.dead}}</text></view>
							<view class="gtop-title">死亡人数</view>
						</view>
					</view>
					<view style="font-size: 30rpx; font-weight: bold;"><text style="background-color: #007AFF; margin-right: 10rpx; padding: 0 4rpx;"></text>疫情分布</view>
					<view class="echartsIn">
						<mpvue-echarts lazyLoad :echarts="echarts" :onInit="mapInit6" ref="echarts6" canvasId="map" />
					</view>
					<view style="font-size: 30rpx; font-weight: bold;"><text style="background-color: #007AFF; margin-right: 10rpx; padding: 0 4rpx;"></text>病例</view>
					<view class="content">
						<view class="grace-table grace-margin-top">
							<view class="grace-theader grace-bg-light-blue">
								<text class="grace-td grace-bold">地区</text>
								<text class="grace-td grace-bold" style="background-color: #005dff;">新增确诊</text>
								<text class="grace-td grace-bold" style="background-color: #F55253;">累计确诊</text>
								<text class="grace-td grace-bold" style="background-color: #178B50;">治愈</text>
								<text class="grace-td grace-bold" style="background-color: #66666c;">死亡</text>
							</view>
							<view class="grace-tbody" v-for="(item, index) in foreignList" :key="index">
								<text class="grace-td">{{item.name}}</text>
								<text class="grace-td">{{item.confirmAdd}}</text>
								<text class="grace-td">{{item.confirm}}</text>
								<text class="grace-td">{{item.heal}}</text>
								<text class="grace-td">{{item.dead}}</text>
							</view>
						</view>
					</view>
				</view>
				
				<view style="margin-top: 40rpx;">
					<view style="font-size: 30rpx; font-weight: bold;"><text style="background-color: #007AFF; margin-right: 10rpx; padding: 0 4rpx;"></text>实时播报</view>
					<view class="set_box" v-for="(sitem,sindex) in timeList" :key="sindex">
						<view class="set_time">
							<view>{{sitem.create_time}}</view>
						</view>
						<!-- 步骤条 -->
						<view class="set-1">
							<view class="set-2">
								<view class="tlak_o" @click="goDetail(sitem,0)">
									<view class="like_">
										<view class="like_o">
											<view class="like_h">
												<text v-if="sindex==0" class="name_">最新</text><text class="time_">{{sitem.title}}</text>
											</view>
											<view class="like_talk">
												<text>{{sitem.summary}}</text>
											</view>
											<view class="like_source">
												<text>信息来源：{{sitem.source}}</text>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			
			<view v-if="cateCurrentIndex==1" class="news-item">
				<view>
					<image style="width: 49%; height: 24px;" src="/static/nstilogo.png"></image>
					<image style="width: 49%; height: 24px; margin-left: 5px;" src="/static/ncmi-logo.png"></image>
				</view>
				<view>
					<image style="width: 100%; height: 300rpx;" src="/static/banner1.jpg"></image>
				</view>
				<view class="set_box" v-for="(sitem,sindex) in dynamicList" :key="sindex">
					<view class="set_time2">
						<view style="font-size: 25rpx;">{{sitem.create_time}}</view>
					</view>
					<!-- 步骤条 -->
					<view class="set-1">
						<view class="set-2">
							<view class="tlak_o">
								<view class="like_">
									<view class="like_o">
										<view class="like_h">
											<text class="time_">{{sitem.title}}</text>
										</view>
										<view class="like_talk">
											<text>{{sitem.summary}}</text>
										</view>
										<!-- <view class="like_detail" @click="goDetail(sitem,1)">
											<text>详细进入...</text>
										</view> -->
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view v-else-if="cateCurrentIndex==2" class="news-item">
				<view>
					<image style="width: 49%; height: 24px;" src="/static/nstilogo.png"></image>
					<image style="width: 49%; height: 24px; margin-left: 5px;" src="/static/ncmi-logo.png"></image>
				</view>
				<view>
					<image style="width: 100%; height: 300rpx;" src="/static/banner5.jpg"></image>
				</view>
				<!-- <view style="text-indent: 60rpx; font-size: 28rpx; color: #2F7DB7; line-height: 50rpx;">
					<text>冠状病毒是一大类病毒，已知会引起疾病，患者表现从普通感冒到重症肺部感染不不同，例如中东呼吸综合症（MERS）和严重急性呼吸综合症（SARS）。新型冠状病毒（nCoV）是一种先前尚未在人类中发现的新型冠状病毒，如此次武汉的新型冠状病毒2019-nCov。目前正处于冬春季呼吸道传染病高发季节，个人要做好卫生防护，注意保持室内环境卫生和空气流通，尽量减少到空气不流通或人流密集的公众场合活动，如有发热、呼吸道感染症状，请及时到医疗机构就诊。</text>
				</view> -->
				<view>
					<view class="pro" v-for="(sitem,sindex) in healthList" :key="sindex">
						<view class="pro_top">
							<view class="pro_item">
								{{sitem.category}}
							</view>
						</view>
						<view class="pro_content" v-for="(ditem,dindex) in sitem.data" :key="dindex" @click="goDetail(ditem,2)">
							<view class="ptitle">{{ditem.title}}</view>
							<view class="ptime">{{ditem.create_time}}</view>
						</view>
					</view>
					
				</view>
			</view>
			<view v-else-if="cateCurrentIndex==3" class="news-item">
				<view>
					<image style="width: 49%; height: 24px;" src="/static/nstilogo.png"></image>
					<image style="width: 49%; height: 24px; margin-left: 5px;" src="/static/ncmi-logo.png"></image>
				</view>
				<view>
					<image style="width: 100%; height: 300rpx;" src="/static/banner4.jpg"></image>
				</view>
				<view style="padding:25rpx 50rpx; background:#F5F6F7">
					<graceSearch @confirm="confirm" :kwd="searchKey"></graceSearch>
				</view>
				<view style="color: #FF3A30;text-align: left; font-size: 23rpx; margin-bottom: 10rpx; margin-top: 10rpx; margin-left: 10rpx;">
					<text style="font-weight: bold;">发热门诊医院：</text>
					<text>进行预检分诊和一般发热患者的诊疗的医院。</text>
				</view>
				<view style="color: #FF3A30;text-align: left; font-size: 23rpx; margin-bottom: 10rpx; margin-top: 10rpx; margin-left: 10rpx;">
					<text style="font-weight: bold;">救治定点医院：</text>
					<text>新型冠状病毒感染疑似病例和确诊病例收治的医院。</text>
				</view>
				<view class="echartsIn">
					<mpvue-echarts lazyLoad :echarts="echarts" :onInit="mapInit2" ref="echarts4" canvasId="map" />
				</view>
				
				<view class="grace-accordion grace-margin-top">
					
					<view class="grace-accordion-items" v-for="(item,index) in provinceData" :key="index">
						<view class="grace-accordion-title grace-bg-blue" :id="'grace-accordion-'+index" @tap="changeAccordion" hover-stay-time="100" hover-class="grace-opacity">
							<text class="grace-icons">{{item.label}}</text>
							<text class="grace-list-imgs-arrow grace-icons icon-arrow-up" v-if="accordionActive == 'grace-accordion-'+index"></text>
							<text class="grace-list-imgs-arrow grace-icons icon-arrow-down" v-else></text>
						</view>
						<view :class="['grace-accordion-body', accordionActive == 'grace-accordion-'+index ? 'grace-accordion-show' : 'grace-accordion-hide']">
							<view class="grace-list">
								<view class="grace-list-items" v-for="(citem,cindex) in cityData[index]" :key="cindex" @click="goOutpatient(index,cindex)">
									<view class="grace-list-body grace-border-b">
										<view class="grace-list-title">
											<text class="grace-list-title-text">{{citem.label}}</text>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view v-else-if="cateCurrentIndex==4" class="news-item">
				<view>
					<image style="width: 49%; height: 24px;" src="/static/nstilogo.png"></image>
					<image style="width: 49%; height: 24px; margin-left: 5px;" src="/static/ncmi-logo.png"></image>
				</view>
				<view>
					<image style="width: 100%; height: 300rpx;" src="/static/banner6.jpg"></image>
				</view>
				<view style="padding:25rpx 50rpx; background:#F5F6F7">
					<graceSearch @confirm="confirm2" :kwd="searchKey2"></graceSearch>
				</view>
				<view style="color: #FF3A30;text-align: left; font-size: 23rpx; margin-bottom: 10rpx; margin-top: 10rpx; margin-left: 10rpx;">
					<text style="font-weight: bold;">疫情心理援助热线：</text>
					<text>负责做好防控疫情的社会心理服务工作，向公众提供心理支持、心理疏导等服务。</text>
				</view>
				<view class="grace-accordion grace-margin-top">
					
					<view class="grace-accordion-items" v-for="(item,index) in proList" :key="index">
						<view class="grace-accordion-title grace-bg-blue" :id="'grace-accordion2-'+index" @tap="changeAccordion2(index)" hover-stay-time="100" hover-class="grace-opacity">
							<text class="grace-icons">{{item.province}}</text>
							<text class="grace-list-imgs-arrow grace-icons icon-arrow-up" v-if="accordionActive2 == 'grace-accordion2-'+index"></text>
							<text class="grace-list-imgs-arrow grace-icons icon-arrow-down" v-else></text>
						</view>
						<view :class="['grace-accordion-body', accordionActive2 == 'grace-accordion2-'+index ? 'grace-accordion-show' : 'grace-accordion-hide']">
							<view class="grace-list">
								<view class="bot_item" v-for="(hitem,hindex) in hospitalList" :key="hindex" >
									<view class="bot_title"><text class="tleft grace-badge demo grace-bg-blue">{{hindex+1}}</text><text style="margin-left: 10rpx;">{{hitem.name}}</text></view>
									<view style="margin-left: 20rpx;" v-if="hitem.city!=null&&hitem.city!=''" class="grace-tags grace-tbr grace-bg-blue">{{hitem.city}}</view>
									<view class="bot_desc">电话：{{hitem.telephone==null||hitem.telephone==''?'暂无':hitem.telephone}}</view>
									<view class="bot_desc">时间：{{hitem.time==null||hitem.time==''?'暂无':hitem.time}}</view>
									<view><image @click="goPhone(hitem)" style="width: 70rpx;height: 70rpx; float: right;margin-top: -100rpx;" src="/static/telephone.png"></image></view>
								</view>
							</view>
						</view>
					</view>
				</view>	
			</view>
			<view v-else-if="cateCurrentIndex==5" class="news-item">
					<view>
						<image style="width: 49%; height: 24px;" src="/static/nstilogo.png"></image>
						<image style="width: 49%; height: 24px; margin-left: 5px;" src="/static/ncmi-logo.png"></image>
					</view>
					<view>
						<image style="width: 100%; height: 300rpx;" src="/static/banner2.jpg"></image>
					</view>
					<view style="color: #FF3A30;text-align: left; font-size: 23rpx; margin-bottom: 10rpx; margin-top: 10rpx; margin-left: 10rpx;">
						<text style="font-weight: bold;">数据说明：</text>
						<text>数据采集自官方公众号/微博/百家号等渠道。</text>
					</view>
					<view>
						<view style="margin: 20rpx;">
							<mx-date-picker :show="showPicker" format="yyyy-mm-dd" :type="type" :value="value" :show-tips="true" :show-seconds="true" @confirm="onSelected" @cancel="onSelected" />
							<view class="grace-form-item grace-border-b">
								<text class="grace-form-label">出行日期</text>
								<view class="grace-form-body" @click="onShowDatePicker('date')">
									<input type="text" class="grace-form-input" name="tdate" v-model="tdate" placeholder="例如:2020-01-23" disabled=true></input>
								</view>
							</view>
							<view class="grace-form-item grace-border-b">
								<text class="grace-form-label">车次/航班</text>
								<view class="grace-form-body">
									<input type="text" class="grace-form-input" name="tno" v-model="tno" placeholder="例如:TR134 或 G11535"></input>
								</view>
							</view>
							<view class="grace-form-item grace-border-b">
								<text class="grace-form-label">地区</text>
								<view class="grace-form-body">
									<input type="text" class="grace-form-input" name="tarea" v-model="tarea" placeholder="例如:成都"></input>
								</view>
							</view>
						</view>
						<view style="display:flex; flex-wrap:nowrap; border-left:1px solid #F8F8F8;">
							<view style="width:100%; text-align:center; margin:10rpx;">
								<button @click="cleart()" type="default" class="grace-button">清除</button>
							</view>
							<view style="width:100%; text-align:center; margin:10rpx;">
								<button @click="searcht()" type="primary" class="grace-button">查询</button>
							</view>
						</view>
						
					</view>
					
					<graceNavBar :items="ntItems" :currentIndex="ntIndex" @change="ntChange"
					    lineHeight="80rpx" :size="150" activeLineBg="#3688FF" textAlign="center"
						activeColor="#3688FF" activeLineWidth="100%" activeLineHeight="2rpx" 
						:margin="10" ></graceNavBar>
					<view style="color: #008CFF;">点击表格行查看详情</view>
					<view class="grace-stable">
						<!-- 数据表头 -->
						<view class="grace-stable-title grace-space-between" style="position: inherit;">
							<view class="grace-stable-l">
								<text class="grace-stable-td grace-bold">交通类型</text>
							</view>
							<scroll-view class="grace-scroll-x grace-stable-r" :scroll-left="scrollLeft" scroll-x>
								<text class="grace-stable-td grace-bold" v-for="(titem,tindex) in travelHead" :key="tindex">{{titem.name}}</text>
								</scroll-view>
						</view>
						<!-- 数据主体 -->
						<view class="grace-stable-body grace-space-between" style="padding-top: 10rpx;">
							<view class="grace-stable-l">
								<text class="grace-stable-td" v-for="(titem,tindex) in travelList" :key="tindex" @click="goTdetail(titem)">{{titem.type_trans}}</text>
							</view>
							<scroll-view class="grace-scroll-x grace-stable-r" scroll-x @scroll="scroll">
								<view class="grace-stable-body-cl" v-for="(titem,tindex) in travelHead" :key="tindex">
									<text class="grace-stable-td" v-for="(ditem,dindex) in travelList" :key="dindex" @click="goTdetail(ditem)">{{ditem[titem.key]==null||ditem[titem.key]==''?'　':ditem[titem.key]}}</text>
									
								</view>
							</scroll-view>
						</view>
					</view>
					<view class="example-body">
						<uni-pagination :current="current" :total="total" :show-icon="true" @change="pageChange" />
					</view>
					<view class="grace-nowrap" style="margin: 20rpx;">当前页：<input style="width: 80rpx;border: 1px solid #F0F0F0;text-align: center;" type="number" v-model="pval" @confirm="goPage()" />
					，数据总量：{{ total }}条
					，每页数据：{{ pageSize }}
					</view>
					<view style="height: 150rpx;"></view>
			</view>			
			<backTop :src="backTop.src"  :scrollTop="backTop.scrollTop"></backTop>
			<view style="text-align:center;" v-show="dataShow">数据为空</view>
		</view>
	</view>
</template>
<script>
var page = 1, pageSize = 10;
import graceNavBar from "@/graceUI/components/graceNavBar.vue";
import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
import backTop from '@/components/back-top/back-top.vue';
import uniPagination from '@/components/uni-pagination/uni-pagination.vue';
import provinceData from '@/graceUI/data/city-data/province.js';
import cityData from '@/graceUI/data/city-data/city.js';
import areaData from '@/graceUI/data/city-data/area.js';
import graceSearch from "@/graceUI/components/graceSearch.vue";
import * as echarts from '@/components/echarts/echarts.min.js';
import mpvueEcharts from '@/components/echarts/echarts.vue';
var chinaJs = require("@/components/echarts/china.js");
var worldJs = require("@/components/echarts/world.js");
var _self;
var nameMap = {
            'Singapore Rep.':'新加坡',
            'Dominican Rep.':'多米尼加',
            'Palestine':'巴勒斯坦',
            'Bahamas':'巴哈马',
            'Timor-Leste':'东帝汶',
            'Afghanistan':'阿富汗',
            'Guinea-Bissau':'几内亚比绍',
            "Côte d'Ivoire":'科特迪瓦',
            'Siachen Glacier':'锡亚琴冰川',
            "Br. Indian Ocean Ter.":'英属印度洋领土',
            'Angola':'安哥拉',
            'Albania':'阿尔巴尼亚',
            'United Arab Emirates':'阿联酋',
            'Argentina':'阿根廷',
            'Armenia':'亚美尼亚',
            'French Southern and Antarctic Lands':'法属南半球和南极领地',
            'Australia':'澳大利亚',
            'Austria':'奥地利',
            'Azerbaijan':'阿塞拜疆',
            'Burundi':'布隆迪',
            'Belgium':'比利时',
            'Benin':'贝宁',
            'Burkina Faso':'布基纳法索',
            'Bangladesh':'孟加拉国',
            'Bulgaria':'保加利亚',
            'The Bahamas':'巴哈马',
            'Bosnia and Herz.':'波斯尼亚和黑塞哥维那',
            'Belarus':'白俄罗斯',
            'Belize':'伯利兹',
            'Bermuda':'百慕大',
            'Bolivia':'玻利维亚',
            'Brazil':'巴西',
            'Brunei':'文莱',
            'Bhutan':'不丹',
            'Botswana':'博茨瓦纳',
            'Central African Rep.':'中非',
            'Canada':'加拿大',
            'Switzerland':'瑞士',
            'Chile':'智利',
            'China':'中国',
            'Ivory Coast':'象牙海岸',
            'Cameroon':'喀麦隆',
            'Dem. Rep. Congo':'刚果民主共和国',
            'Congo':'刚果',
            'Colombia':'哥伦比亚',
            'Costa Rica':'哥斯达黎加',
            'Cuba':'古巴',
            'N. Cyprus':'北塞浦路斯',
            'Cyprus':'塞浦路斯',
            'Czech Rep.':'捷克',
            'Germany':'德国',
            'Djibouti':'吉布提',
            'Denmark':'丹麦',
            'Algeria':'阿尔及利亚',
            'Ecuador':'厄瓜多尔',
            'Egypt':'埃及',
            'Eritrea':'厄立特里亚',
            'Spain':'西班牙',
            'Estonia':'爱沙尼亚',
            'Ethiopia':'埃塞俄比亚',
            'Finland':'芬兰',
            'Fiji':'斐',
            'Falkland Islands':'福克兰群岛',
            'France':'法国',
            'Gabon':'加蓬',
            'United Kingdom':'英国',
            'Georgia':'格鲁吉亚',
            'Ghana':'加纳',
            'Guinea':'几内亚',
            'Gambia':'冈比亚',
            'Guinea Bissau':'几内亚比绍',
            'Eq. Guinea':'赤道几内亚',
            'Greece':'希腊',
            'Greenland':'格陵兰',
            'Guatemala':'危地马拉',
            'French Guiana':'法属圭亚那',
            'Guyana':'圭亚那',
            'Honduras':'洪都拉斯',
            'Croatia':'克罗地亚',
            'Haiti':'海地',
            'Hungary':'匈牙利',
            'Indonesia':'印度尼西亚',
            'India':'印度',
            'Ireland':'爱尔兰',
            'Iran':'伊朗',
            'Iraq':'伊拉克',
            'Iceland':'冰岛',
            'Israel':'以色列',
            'Italy':'意大利',
            'Jamaica':'牙买加',
            'Jordan':'约旦',
            'Japan':'日本',
            'Kazakhstan':'哈萨克斯坦',
            'Kenya':'肯尼亚',
            'Kyrgyzstan':'吉尔吉斯斯坦',
            'Cambodia':'柬埔寨',
            'Korea':'韩国',
            'Kosovo':'科索沃',
            'Kuwait':'科威特',
            'Lao PDR':'老挝',
            'Lebanon':'黎巴嫩',
            'Liberia':'利比里亚',
            'Libya':'利比亚',
            'Sri Lanka':'斯里兰卡',
            'Lesotho':'莱索托',
            'Lithuania':'立陶宛',
            'Luxembourg':'卢森堡',
            'Latvia':'拉脱维亚',
            'Morocco':'摩洛哥',
            'Moldova':'摩尔多瓦',
            'Madagascar':'马达加斯加',
            'Mexico':'墨西哥',
            'Macedonia':'马其顿',
            'Mali':'马里',
            'Myanmar':'缅甸',
            'Montenegro':'黑山',
            'Mongolia':'蒙古',
            'Mozambique':'莫桑比克',
            'Mauritania':'毛里塔尼亚',
            'Malawi':'马拉维',
            'Malaysia':'马来西亚',
            'Namibia':'纳米比亚',
            'New Caledonia':'新喀里多尼亚',
            'Niger':'尼日尔',
            'Nigeria':'尼日利亚',
            'Nicaragua':'尼加拉瓜',
            'Netherlands':'荷兰',
            'Norway':'挪威',
            'Nepal':'尼泊尔',
            'New Zealand':'新西兰',
            'Oman':'阿曼',
            'Pakistan':'巴基斯坦',
            'Panama':'巴拿马',
            'Peru':'秘鲁',
            'Philippines':'菲律宾',
            'Papua New Guinea':'巴布亚新几内亚',
            'Poland':'波兰',
            'Puerto Rico':'波多黎各',
            'Dem. Rep. Korea':'朝鲜',
            'Portugal':'葡萄牙',
            'Paraguay':'巴拉圭',
            'Qatar':'卡塔尔',
            'Romania':'罗马尼亚',
            'Russia':'俄罗斯',
            'Rwanda':'卢旺达',
            'W. Sahara':'西撒哈拉',
            'Saudi Arabia':'沙特阿拉伯',
            'Sudan':'苏丹',
            'S. Sudan':'南苏丹',
            'Senegal':'塞内加尔',
            'Solomon Is.':'所罗门群岛',
            'Sierra Leone':'塞拉利昂',
            'El Salvador':'萨尔瓦多',
            'Somaliland':'索马里兰',
            'Somalia':'索马里',
            'Serbia':'塞尔维亚',
            'Suriname':'苏里南',
            'Slovakia':'斯洛伐克',
            'Slovenia':'斯洛文尼亚',
            'Sweden':'瑞典',
            'Swaziland':'斯威士兰',
            'Syria':'叙利亚',
            'Chad':'乍得',
            'Togo':'多哥',
            'Thailand':'泰国',
            'Tajikistan':'塔吉克斯坦',
            'Turkmenistan':'土库曼斯坦',
            'East Timor':'东帝汶',
            'Trinidad and Tobago':'特里尼达和多巴哥',
            'Tunisia':'突尼斯',
            'Turkey':'土耳其',
            'Tanzania':'坦桑尼亚',
            'Uganda':'乌干达',
            'Ukraine':'乌克兰',
            'Uruguay':'乌拉圭',
            'United States':'美国',
            'Uzbekistan':'乌兹别克斯坦',
            'Venezuela':'委内瑞拉',
            'Vietnam':'越南',
            'Vanuatu':'瓦努阿图',
            'West Bank':'西岸',
            'Yemen':'也门',
            'South Africa':'南非',
            'Zambia':'赞比亚',
            'Zimbabwe':'津巴布韦'
        }
	
export default{
	components: {
		graceNavBar,
		backTop,
		uniPagination,
		graceSearch,
		MxDatePicker,
		mpvueEcharts,
	},
	data() {
		return {
			cateCurrentIndex : 0,
			navItems : [{id:0,name:'疫情地图'},
						{id:1,name:'实时动态'}, 
						{id:2,name:'健康防护'}, 
						{id:3,name:'定点医院'},
						{id:4,name:'心理援助'},
						{id:5,name:'同程查询'},
					],
			echarts,
			mapData:[],
			xData:[],
			yData:{},
			backTop: {
				src: '/static/top.png',
				scrollTop: 0
			},
			dataShow: false,
			top : 0,
			
			lastUpdateTime:'',
			chinaTotal:{},
			chinaAdd:{},
			chinaDayAdd:{},
				
			hospitals:{
				h0:'',
				h1:''
			},
			
			tableList: [],
			timeList: [],
			dynamicList: [],
			healthList: [],
			hospitalList: [],
			
			mapData2:[],
			searchKey : "",
			accordionActive: "grace-accordion-0",
			searchKey2 : "",
			accordionActive2: "grace-accordion2-0",
			proList:[],
			
			provinceData:provinceData,
			cityData:cityData,
			
			travelHead: [{name:'日期',key:'travel_date'},{name:'车次/车牌/航班号/场所名称',key:'number'},
					{name:'车厢',key:'number_sub'},{name:'出发站',key:'pos_start'},
					{name:'到达站',key:'pos_end'},{name:'车次附加描述',key:'number_info'},
					{name:'开始时间',key:'start_time'},{name:'结束时间',key:'end_time'},
					{name:'线索人',key:'submit_user'},{name:'提交时间',key:'create_time'},
				],
			travelList: [],
			
			scrollLeft : 0,
			ntItems: [],
			ntIndex : 0,
			
			tdate:'',
			tno:'',
			tarea:'',
			
			showPicker: false,
			date: '',
			type: 'rangetime',
			value: '',
			
			current: 1,
			pval: 1,
			total: 0,
			pageSize: 10,
			
			visitCount: 0,
			
			aindex: 0,
			globalStatis:{},
			mapData6:[],
			foreignList:[],
		};
	},
	onPageScroll(e) {
		this.backTop.scrollTop = e.scrollTop;
	},
	onUnload() {
		page = 1;
		this.timeList=[];
		this.dynamicList=[];
		this.healthList=[];
		this.hospitalList=[];
	},
	onLoad:function(){
		_self = this;
		// #ifdef H5
		this.top = '44px';
		// #endif
		chinaJs.registChinaMap(this.echarts);
		worldJs.registChinaMap(this.echarts);
		this.getNewsList('refresh');
	},
	//下拉刷新
	onPullDownRefresh : function(){
		this.getNewsList('refresh');
		// console.log("下拉刷新");
	},
	// 加载更多
	onReachBottom : function(){
		this.getNewsList('add');
		// console.log("上拉加载");
	},
	methods:{

		navChange : function (index,e){
			this.cateCurrentIndex = index;
			this.getNewsList('refresh');
		},
		
		mapInit: function (canvas, width, height) {
			echarts.setCanvasCreator(() => canvas);
			let mapChart = echarts.init(canvas, null, {
				width: width,
				height: height
			})
			canvas.setChart(mapChart)
			// mapChart.on('click', function(params){    
			// 	console.log(params);  
			// });
			mapChart.setOption(getMapOption(_self.mapData))
			return mapChart		
		},
		mapInit2: function (canvas, width, height) {
			echarts.setCanvasCreator(() => canvas);
			let mapChart = echarts.init(canvas, null, {
				width: width,
				height: height
			})
			canvas.setChart(mapChart)
			// mapChart.on('click', function(params){    
			// 	console.log(params);  
			// });
			mapChart.setOption(getMapOption2(_self.mapData2))
			return mapChart		
		},
		mapInit6: function (canvas, width, height) {
			echarts.setCanvasCreator(() => canvas);
			let mapChart = echarts.init(canvas, null, {
				width: width,
				height: height
			})
			canvas.setChart(mapChart)
			// mapChart.on('click', function(params){    
			// 	console.log(params);  
			// });
			mapChart.setOption(getMapOption6(_self.mapData6))
			return mapChart		
		},
		lineInit: function (canvas, width, height) {
			echarts.setCanvasCreator(() => canvas);
			let lineChart = echarts.init(canvas, null, {
				width: width,
				height: height
			})
			canvas.setChart(lineChart)
			lineChart.setOption(getLineOption(_self.xData,_self.yData))
			return lineChart		
		},
		lineInit2: function (canvas, width, height) {
			echarts.setCanvasCreator(() => canvas);
			let lineChart = echarts.init(canvas, null, {
				width: width,
				height: height
			})
			canvas.setChart(lineChart)
			lineChart.setOption(getLineOption2(_self.xData,_self.yData))
			return lineChart		
		},
		
		changeAIndex(t){
			this.aindex = t;
			if(t==0){
				setTimeout(function (){
					_self.$refs.echarts1.init();
					_self.$refs.echarts2.init();
					_self.$refs.echarts3.init();
				}, 300);
			}else{
				setTimeout(function (){
					_self.$refs.echarts6.init();
				}, 300);
			}
		},
		
		//疫情地图开始
		goAreaList(){
			uni.navigateTo({
				url: '/pages/area-list/area-list'
			})
		},
	
		getVisitCount(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getVisitCount',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						this.visitCount = thousands(1300 + r.data.data);
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				}
			})
		},
		getEpidemicStatistics(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getEpidemicStatistics',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					
				},
				method: "POST",
				success: (r) => {
					//console.log(r);
					if (r.data.code == '000000') {
						this.lastUpdateTime = r.data.data.lastUpdateTime;
						this.chinaTotal = r.data.data.chinaTotal;
						this.chinaAdd = r.data.data.chinaAdd;
						this.chinaDayAdd = r.data.data.chinaDayAddList[r.data.data.chinaDayAddList.length-1];
						this.globalStatis = r.data.data.globalStatis;
						
						this.tableList = r.data.data.dataList;
						this.foreignList = r.data.data.foreignList;
						this.mapData = [];
						for(var i=0;i<this.tableList.length;i++){
							 var mtemp = this.tableList[i];
							 mtemp.value = mtemp.confirm;
							 this.mapData.push(mtemp);
						} 
						this.mapData6 = [{name:'中国',
										 value:this.chinaTotal.confirm,
										 confirm:this.chinaTotal.confirm,
										 heal:this.chinaTotal.heal,
										 dead:this.chinaTotal.dead}];
						for(var i=0;i<this.foreignList.length;i++){
							 var mtemp = this.foreignList[i];
							 if(mtemp.name=='日本本土'){
								mtemp.name = '日本';
							 }
							 mtemp.value = mtemp.confirm;
							 this.mapData6.push(mtemp);
						} 
						setTimeout(function (){
							_self.$refs.echarts1.init();
							//_self.$refs.echarts6.init();
						}, 300);
						
						
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				}
			})
		},
		getEpidemicLine(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getEpidemicLine',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					pageNumber: 1,
					pageSize: 7
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						this.xData = [];
						this.yData = {
							diagnose:[],
							suspected:[],
							healing:[],
							death:[],
						};
						for(var i=0;i<r.data.data.length;i++){
							this.xData.push(r.data.data[i].monthday);
							this.yData.diagnose.push(r.data.data[i].diagnose_count);
							this.yData.suspected.push(r.data.data[i].suspected_count);
							this.yData.healing.push(r.data.data[i].healing_count);
							this.yData.death.push(r.data.data[i].death_count);
						} 
						setTimeout(function (){
							_self.$refs.echarts2.init();
							_self.$refs.echarts3.init();
						}, 300);
						
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				}
			})
		},
		getHospitalsCount(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getHospitalsCount',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						this.hospitals = {
							h0:r.data.data.h0,
							h1:r.data.data.h1,
						};
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				}
			})
		},
		getEpidemicOnline(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getEpidemicOnline',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					pageNumber: page,
					pageSize: pageSize
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						var count = r.data.data.count;
						var pageSum = Math.ceil(count/pageSize);
						if(pageSum==0){
							this.dataShow = true;
						}else{
							if (page>pageSum) {
								uni.showToast({
									title: "已经加载全部",
									icon: "none",
									duration: 1500
								});
							}else{
								this.dataShow = false;
								for(var i=0;i<r.data.data.data.length;i++){
									var tempobj = {
										id: r.data.data.data[i].id,
										create_time: r.data.data.data[i].create_time.substring(5,r.data.data.data[i].create_time.length-3),
										title: r.data.data.data[i].title,
										summary: r.data.data.data[i].summary,
										source: r.data.data.data[i].source,
										url: r.data.data.data[i].url,
									};
									this.timeList = this.timeList.concat(tempobj);
								}
								page++;
							}
						}
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				},
				complete: r => {
					uni.stopPullDownRefresh();
				}
			})
		},
		//疫情地图结束
		//实时动态开始
		getNewsOnline(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getNewsOnline',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					pageNumber: page,
					pageSize: pageSize
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						var count = r.data.data.count;
						var pageSum = Math.ceil(count/pageSize);
						if(pageSum==0){
							this.dataShow = true;
						}else{
							if (page>pageSum) {
								uni.showToast({
									title: "已经加载全部",
									icon: "none",
									duration: 1500
								});
							}else{
								this.dataShow = false;
								for(var i=0;i<r.data.data.data.length;i++){
									var tempobj = {
										id: r.data.data.data[i].id,
										create_time: r.data.data.data[i].create_time,
										title: r.data.data.data[i].title,
										summary: r.data.data.data[i].summary,
										url: r.data.data.data[i].url,
									};
									this.dynamicList = this.dynamicList.concat(tempobj);
								}
								page++;
							}
						}
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				},
				complete: r => {
					uni.stopPullDownRefresh();
				}
			})
		},
		//实时动态结束
		//健康防护开始
		getHealthOnline(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getHealthOnline',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					pageNumber: page,
					pageSize: 5
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						for(var i=0;i<r.data.data.length;i++){
							var tempobj = {
								category: r.data.data[i].category,
								data: r.data.data[i].data,
							};
							this.healthList = this.healthList.concat(tempobj);
						}
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				},
				complete: r => {
					uni.stopPullDownRefresh();
				}
			})
		},
		//健康防护结束
		//定点医院开始
		changeAccordion : function(e){
			var accordionIndex = e.currentTarget.id;
			if (this.accordionActive == accordionIndex){accordionIndex = '';}
			this.accordionActive = accordionIndex;
		},
		getProvinceHostpital(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getProvinceHostpital',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					//type: 1
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						this.mapData2 = [];
						for(var i=0;i<r.data.data.length;i++){
							this.mapData2.push({
								name: r.data.data[i].province.replace(/省|市|自治区|回族|壮族|维吾尔/g,''),
								value: r.data.data[i].count,
							});
						} 
						setTimeout(function (){
							_self.$refs.echarts4.init();
						}, 300);
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				},
				complete: r => {
					uni.stopPullDownRefresh();
				}
			})		
		},
		confirm : function (e) {
			this.searchKey = e;
			uni.navigateTo({
				url: '../outpatient/outpatient?type=1&searchKey='+this.searchKey
			})
		},
		goOutpatient(pindex,cindex){
			uni.navigateTo({
				url: '../outpatient/outpatient?type=1&pindex='+pindex+'&cindex='+cindex
			})
		},
		//定点医院结束
		
		//心理援助开始
		confirm2 : function (e) {
			this.searchKey2 = e;
			this.accordionActive2 = "grace-accordion2-0";
			this.getHospitalProvince();
		},
		changeAccordion2 : function(index){
			var accordionIndex = 'grace-accordion2-'+index;
			if (this.accordionActive2 == accordionIndex){
				accordionIndex = '';
				this.hospitalList = [];
			}else{
				this.getHospitals(index);
			}
			this.accordionActive2 = accordionIndex;
			
		},
		goPhone(item){
			if(item.telephone==null || item.telephone==''){
				uni.showToast({
					icon:'none',
					title:'暂无联系方式'
				})
				return;
			}
			uni.makePhoneCall({
			     phoneNumber: item.telephone.split('；|;')[0].split('/')[0].split('(')[0]
			});
		},
		getHospitalProvince(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getHospitalProvince',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					name: this.searchKey2
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						if(r.data.data.length==0){
							uni.showToast({
								icon: 'none',
								title: '暂无数据'
							})
							return;
						}
						this.proList = r.data.data;
						this.getHospitals(0);
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				}
			})
		},
		getHospitals(t){
			uni.showLoading({})
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getHospitals',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					province: t==null?'':this.proList[t].province,
					city: '',
					district: '',
					name: this.searchKey2,
					type: 2,
					pageNumber: 1,
					pageSize: 500
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						this.hospitalList = [];
						for(var i=0;i<r.data.data.data.length;i++){
							var tempobj = {
								name: r.data.data.data[i].name,
								level: r.data.data.data[i].level,
								address: r.data.data.data[i].address,
								telephone: r.data.data.data[i].telephone,
								map_point: r.data.data.data[i].map_point,
								province: r.data.data.data[i].province,
								city: r.data.data.data[i].city,
								time: r.data.data.data[i].diagnosis_time,
								type: r.data.data.data[i].type,
							};
							this.hospitalList = this.hospitalList.concat(tempobj);
						}
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				},
				complete: r => {
					uni.hideLoading();
					uni.stopPullDownRefresh();
				}
			})
		},
		
		//心理援助结束
		
		//同行查询开始
		ntChange : function (index,e){
			this.ntIndex = index;
			this.current = 1;
			this.getTravelRecord();
		},
		scroll : function (e) {
			this.scrollLeft = e.detail.scrollLeft;
		},
		pageChange(e) {
			this.current = e.current;
			this.pval = this.current;
			this.getTravelRecord();
		},
		goPage(){
			var pageSum = Math.ceil(this.total/this.pageSize);
			this.current = this.pval < 1? 1:this.pval > pageSum?pageSum:this.pval
			this.pval = this.current;
			this.getTravelRecord();
		},
		onShowDatePicker(type){//显示
			this.type = type;
			this.showPicker = true;
			this.value = this[type];
		},
		onSelected(e) {//选择
			this.showPicker = false;
			if(e) {
				this[this.type] = e.value; 
				this.tdate = e.value;
			}
		},
		cleart(){
			this.tdate = '';
			this.tno = '';
			this.tarea = '';
		},
		searcht(){
			this.getTravelRecord();
		},
		getTravelType(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getTravelType',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						this.ntItems = [{
							id: '',
							name: '全部'
						}];
						for(var i=0;i<r.data.data.length;i++){
							this.ntItems.push({
								id: r.data.data[i].type,
								name: r.data.data[i].type_trans
							});
						}
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				}
			})
		},
		getTravelRecord(){
			uni.request({
				url: this.serverUrl + '/feiyan/search-api/getTravelRecord',
				header: {
					"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
				},
				data: {
					travelDate: this.tdate,
					number: this.tno,
					area: this.tarea,
					type: this.ntItems.length==0?'':this.ntItems[this.ntIndex].id,
					pageNumber: this.current,
					pageSize: this.pageSize
				},
				method: "POST",
				success: (r) => {
					// console.log(r);
					if (r.data.code == '000000') {
						this.total = r.data.data.count;
						this.travelList = r.data.data.data;
					} else {
						uni.showToast({
							title: r.data.message
						});
					}
				},
				complete: r => {
					uni.stopPullDownRefresh();
				}
			})
		},
		goTdetail(item){
			uni.navigateTo({
				url: '/pages/travel-detail/travel-detail?id='+item.id
			})
		},
		//同行查询结束
		
		getNewsList(t){
			if(t=='refresh'){
				page = 1;
				this.current = 1;
				this.pval = 1;
				this.timeList=[];
				this.dynamicList=[];
				this.healthList=[];
				this.hospitalList=[];
			}
			if(this.cateCurrentIndex==0){
				if(t=='refresh'){
					this.getVisitCount();
					this.getEpidemicStatistics();
					this.getEpidemicLine();
					this.getHospitalsCount();
				}
				this.getEpidemicOnline();
			}else if(this.cateCurrentIndex==1){
				this.getNewsOnline();
			}else if(this.cateCurrentIndex==2){
				if(t=='refresh'){
					this.getHealthOnline();
				}
			}else if(this.cateCurrentIndex==3){
				if(t=='refresh'){
					this.getProvinceHostpital();
				}
			}else if(this.cateCurrentIndex==4){
				if(t=='refresh'){
					this.getHospitalProvince();
				}
			}else if(this.cateCurrentIndex==5){
				if(t=='refresh'){
					this.getTravelType();
					this.getTravelRecord();
				}
			}
		},

		goDetail(item,type){
			uni.navigateTo({
				url: '/pages/webview/webview?url='+encodeURIComponent(item.url)
			})
			// if(item.url.endsWith('.pdf')){
			// 	uni.navigateTo({
			// 		url: '/pages/webview/webview?url='+encodeURIComponent(item.url)
			// 	})
			// }else{
			// 	uni.navigateTo({
			// 		url: '/pages/news-detail/news-detail?id='+item.id+'&type='+type
			// 	})
			// }
		},
	}
}
	function thousands(num){
		var str = num.toString();
		var reg = str.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g;
		return str.replace(reg,"$1,");
	}
	
	function getMapOption(data) {
	    return {
			animation: false,
	        backgroundColor: '#F8F8F8',
			title: {
				text: '',
				subtext: '',
				left: 'left',
				textStyle: {
					align: 'center',
					color: '#4d79f3',
					fontSize: 16,
				}
			},
			tooltip : {
				trigger: 'item' ,	
				position: [20, 20],
				enterable: true,
				formatter: function(params) {
					var name = params.name;
					// var value = isNaN(params.value)?'0':params.value;
					// return name+':'+value;
					
					var val =  name+'\n';
					if(params.data!=null){
						val += '确诊：'+params.data.confirm+'\n'
							+'治愈：'+params.data.cure+'\n'
							+'死亡：'+params.data.death;
					}else{
						val += '暂无数据';
					}
					return val;
				},
			},
			visualMap: {
				// min: 0,
				// max: 1000,
				itemWidth:10,
				itemHeight:10,
				padding: 1,
				textGap:5, 
				right: 10,
				bottom: 40,
				showLabel: !0,
				// text: ["高", "低"],
				pieces: [{
					gt: 1000,
					label: "> 1000",
					color: "#7f1100"
				}, {
					gte: 500,
					lte: 999,
					label: "500 - 999",
					color: "#CD5C5C"
				}, {
					gte: 100,
					lte: 499,
					label: "100 - 499",
					color: "#ff5428"
				}, {
					gte: 10,
					lte: 99,
					label: "10 - 99",
					color: "#ff8c71"
				}, {
					gte: 1,
					lte: 9,
					label: "1 - 9",
					color: "#ffd768"
				}, {
					value: 0,
					color: "#ffffff"
				}],
				show: !0
			},
			series: [
				{
					name: '数据',
					type: 'map',
					mapType: 'china',
					roam: false,
					label: {
						normal: {
							show: true,  //省份名称
							textStyle: { color: '#000', fontSize: '5'},
							/* formatter: function(params) {
								return isNaN(params.value)?'':params.value;
							}, */
						},
						emphasis: { show: false }
					},
					itemStyle: {
						emphasis: {//鼠标移入高亮显颜色
							areaColor: '#87CEFA'
						}
					},
					data:data
				}
			]
	    }
	}
	function getMapOption2(data) {
			return {
				animation: false,
				backgroundColor: '#F8F8F8',
				title: {
					text: '发热门诊与定点医院统计',
					subtext: '',
					left: 'left',
					textStyle: {
						align: 'center',
						color: '#4d79f3',
						fontSize: 16,
					}
				},
				tooltip : {
					trigger: 'item' ,	
					position: [20, 20],
					enterable: true,
					formatter: function(params) {
						var name = params.name;
						var value = isNaN(params.value)?'0':params.value;
						return name+':'+value;
					},
				},
				visualMap: {
					// min: 0,
					// max: 1000,
					itemWidth:10,
					itemHeight:10,
					padding: 1,
					textGap:5, 
					right: 10,
					bottom: 40,
					showLabel: !0,
					// text: ["高", "低"],
					pieces: [{
						gt: 1000,
						label: "> 1000",
						color: "#7f1100"
					}, {
						gte: 500,
						lte: 999,
						label: "500 - 999",
						color: "#CD5C5C"
					}, {
						gte: 100,
						lte: 499,
						label: "100 - 499",
						color: "#ff5428"
					}, {
						gte: 10,
						lte: 99,
						label: "10 - 99",
						color: "#ff8c71"
					}, {
						gte: 1,
						lte: 9,
						label: "1 - 9",
						color: "#ffd768"
					}, {
						value: 0,
						color: "#ffffff"
					}],
					show: !0
				},
				series: [
					{
						name: '数据',
						type: 'map',
						mapType: 'china',
						roam: false,
						label: {
							normal: {
								show: true,  //省份名称
								textStyle: { color: '#000', fontSize: '5'},
								/* formatter: function(params) {
									return isNaN(params.value)?'':params.value;
								}, */
							},
							emphasis: { show: false }
						},
						itemStyle: {
							emphasis: {//鼠标移入高亮显颜色
								areaColor: '#87CEFA'
							}
						},
						data:data
					}
				]
			}
		}
	function getMapOption6(data) {
			return {
				backgroundColor: '#F8F8F8',
                title: {
                    text: '',
                    subtext: '',
                    sublink: '',
                    top:"30px",
                    left: 'center',
                    textStyle: {color: '#fff'}
                },
                visualMap: {   //图列显示柱
                    // min: 0,
                    // max: 1000,
					//orient: 'horizontal',
                    itemWidth:10,
                    itemHeight:10,
                    padding: 1,
                    textGap:5,
                    left: '10',
                    bottom: 10,
                    showLabel: !0,
                    textStyle:{
                        color: "#000"
                    },
                    // text: ["高", "低"],
                    pieces: [{"gt":100000,"label":">=100000","color":"#660208"},
						{"gte":50000,"lte":99999,"label":"50000-99999","color":"#8C0D0D"},
						{"gte":10000,"lte":49999,"label":"10000-49999","color":"#CC2929"},
						{"gte":1000,"lte":9999,"label":"1000-9999","color":"#FF7B69"},
						{"gte":100,"lte":999,"label":"100-999","color":"#FFAA85"},
						{"gte":1,"lte":99,"label":"1-99","color":"#FFE4D9"},
						{"value":0,"color":"#FFFFFF"}],
                    show: !0
                },
                toolbox: {
                    feature: {
                        //restore: {}
                    }
                },
                tooltip: {  //提示框组件
                    trigger: 'item',
					position: [20, 20],
                    formatter:  function(params) {
                        var name = params.name;
                        var val =  name+'\n';
                        if(params.data!=null){
                        	val += '确诊：'+params.data.confirm+'\n'
                        		+'治愈：'+params.data.heal+'\n'
                        		+'死亡：'+params.data.dead;
                        }else{
                        	val += '暂无数据';
                        }
                        return val;
                    }
                },
                series: [{
                    name:"",
                    type: 'map',
                    mapType: 'world',
                    //roam: true,
                    top: '5%',
                    bottom: '10%',
                    zoom: 0.6,
                    mapLocation: {y: 100},
                    data: data,   //绑定数据
                    nameMap: nameMap,
                    symbolSize: 12,
                    label: {
                        normal: {show: false},
                        emphasis: {show: false}
                    },
                    itemStyle: {
                        normal: {
                            areaColor: '#FFF5EE',
                            borderColor: '#8F98A6'
                        },
                        emphasis: {
                            areaColor: '#87CEFA',
                            borderColor: '#fff',
                            borderWidth: 1
                        }
                    }
                }],
            }
		}			
	function getLineOption(xData,yData) {
		return {
			title: {
				left: 'left',
				text: '',
				textStyle: {
					align: 'center',
					color: '#FFFFFF',
					fontSize: 16,
				}

			},
			backgroundColor: '#F8F8F8',
			tooltip: {
				trigger: 'axis',
				position: [20, 20],
				axisPointer: {
					type: 'cross'
				}
			},
			legend: {
				x: 'right',
				y: '10px',
				textStyle: {
					fontSize: 13,
				},
				icon: 'circle',
				data: ['确诊', '疑似' ]
			},
			grid: {
				right: '15%',
				// bottom: '10%',
				// left: '10%',
				// top: '80px',
				containLabel: true
			},
			xAxis: [{
				type: 'category',
				data: xData,
				name: '日期',
				axisTick: {
					show: false,
				},
				axisLabel: {
					show: true,
					textStyle: {
						// color: "#FFF",
						fontSize: 10,
					},
				},
			}],
			yAxis: [{
				type: 'value',
				name: '人数',
				
			}, ],
			series: [{
					name: '确诊',
					type: 'line',
					symbolSize: 6,
					itemStyle: {
						normal: {
							color: '#F55253',
						}
					},
					data: yData.diagnose
				},
				{
					name: '疑似',
					type: 'line',
					symbolSize: 6,
					itemStyle: {
						normal: {
							color: '#FF961E',
						}
					},					
					data: yData.suspected
				}

			]
		}
	}	
	function getLineOption2(xData,yData) {
		return {
			title: {
				left: 'left',
				text: '',
				textStyle: {
					align: 'center',
					color: '#FFFFFF',
					fontSize: 16,
				}

			},
			backgroundColor: '#F8F8F8',
			tooltip: {
				trigger: 'axis',
				position: [20, 20],
				axisPointer: {
					type: 'cross'
				}
			},
			legend: {
				x: 'right',
				y: '10px',
				textStyle: {
					fontSize: 13,
				},
				icon: 'circle',
				data: ['治愈', '死亡']
			},
			grid: {
				right: '15%',
				// bottom: '10%',
				// left: '10%',
				// top: '80px',
				containLabel: true
			},
			xAxis: [{
				type: 'category',
				data: xData,
				name: '日期',
				axisTick: {
					show: false,
				},
				axisLabel: {
					show: true,
					textStyle: {
						// color: "#FFF",
						fontSize: 10,
					},
				},
			}],
			yAxis: [{
				type: 'value',
				name: '人数',
				
			}, ],
			series: [{
					name: '治愈',
					type: 'line',
					symbolSize: 6,
					itemStyle: {
						normal: {
							color: '#178B50',
						}
					},
					data: yData.healing
				},
				{
					name: '死亡',
					type: 'line',
					symbolSize: 6,
					itemStyle: {
						normal: {
							color: '#66666c',
						}
					},
					data: yData.death
				}

			]
		}
	}
</script>


<style lang='scss'>
@import "../../graceUI/animate.css";
.grace-accordion-show{height:auto; animation:fadeIn 300ms linear;}
.grace-accordion-hide{height:0; animation:fadeOut 300ms linear;}
.grace-accordion-title{color:#FFFFFF; margin-bottom: 2rpx;}
.grace-accordion-title .grace-icons:before{margin-right:10rpx; font-size:40rpx !important;}

/* 分段器头部 fixed 定位 */
.fixedit{width:100%; position:fixed; z-index:99; left:0; top:0; background-color: #FFF;}
.grace-news-list-imgs{max-height:68px; overflow:hidden;}
.grace-tab-title view {padding: 0 20rpx; margin: 0 2rpx;}

.fhead{
	font-size: 24rpx;
	text-align: center;
	padding-bottom: 5rpx;
	margin-bottom: 5rpx;
	background-color: #1E90FF;
	color: #FFCD00;
	font-weight: bold;
	/* opacity: 0.4; */
	border-radius: 2px;
}

.fhead2{
	font-size: 24rpx;
	text-align: right;
	padding: 5rpx 5rpx;
	margin-bottom: 5rpx;
	background-color: #000;
	color: #fff;
	opacity: 0.4;
	border-radius: 2px;
}

.ghead{background-color: #f5f5f5; font-size: 24rpx; text-align: center; margin-top: 10rpx; padding: 20rpx 5rpx;}
.ghead-left{background-color: #4d79f3;color: #fff; border-radius:5px;margin-right: 10rpx; padding: 5rpx 10rpx;}
.gtop{background-color: #f5f5f5; height:140rpx; width:25%;}
.gtop-head{text-align: center; font-size: 20rpx; color: #7C7C7C;}
.gtop-desc{text-align: center; font-size: 36rpx; font-weight: bolder; margin-top: 5rpx;}
.gtop-title{text-align: center; font-size: 24rpx;margin-top: 10rpx;}

.echartsIn{width:100%; height: 500upx;margin: 10rpx 0;}	

.grace-stable-td{
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
	justify-content:flex-start;
}
/* 时间轴-start */
.set_box {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: row;
}

/* 左侧时间 */
.set_time {
	width: 10%;
	position: relative;

	view {
		width: 120%;
		position: absolute;
		margin-top: 60upx;
		right: -40rpx;
		color: #999999;
	}

}
.set_time2 {
	width: 15%;
	position: relative;
	view {
		width: 150%;
		position: absolute;
		margin-top: 60upx;
		right: -40rpx;
		color: #999999;
	}

}

/* 右侧内容 */

.set-1 {
	width: 90%;
}

.set-2 {
	/* min-height: 300upx; */
	border-radius: 10upx;
	width: 84%;
	margin-left: 100upx;
	margin-top: 60upx;
	padding-right: 10rpx;
	position: relative;

	.tlak_o {
		width: 100%;
		/* min-height: 300upx; */

		.like_ {
			width: 100%;
			min-height: 100rpx;

			.like_o {
				width: 100%;
				height: 100%;

				.like_h {
					.name_ {
						margin-right: 20rpx;
						font-size: 28rpx;
						color: #FFF;
						background-color: red;
						border-radius:5px;
						padding: 5rpx 10rpx;
					}

					.time_ {
						font-size: 28rpx;
						color: #000000;
						font-weight: bold;
						
					}
				}

				.like_talk {
					width: 98%;
					min-height: 100rpx;

					text {
						font-size: 24rpx;
						color: #999999;
					}
				}
				.like_source {
					color: #999999;
					float: right;
					font-size: 20rpx;
				}
				.like_detail {
					color: #1E90FF;
					text-decoration: underline;
				}
			}
		}
	}
}

.set-2::after {
	content: '';
	/* 必须存在如果没有图标就留空 */
	top: -20upx;
	/* 定位 距离*/
	border-left: #c6c6c6 1px solid;
	/* 横线颜色 */
	left: -44upx;
	/* 定位 距离*/
	height: 120%;
	/* 高度 */
	position: absolute;
	/* 定位 */
}

.set-2::before {
	z-index: 99;
	content: "\e64d";
	/* 必须存在如果没有图标就留空 */
	color: #1E90FF;
	/* 设置颜色 */
	position: absolute;
	/* 定位 */
	left: -70upx;
	top: -20upx;
	/* 移动到左边 */
	font-weight: bold;
	/* 图标样式在复制的图标文件中复制相对应的图标样式必须存在 */
	font-family: "iconfont" !important;
	/* 图标样式在复制的图标文件中复制相对应的图标样式必须存在 */
	font-size: 54upx;
	/* 图标大小 */
	font-style: normal;
	/* 图标样式在复制的图标文件中复制相对应的图标样式必须存在 */
	-webkit-font-smoothing: antialiased;
	/* 图标样式在复制的图标文件中复制相对应的图标样式必须存在 */
	-moz-osx-font-smoothing: grayscale;
	/* 图标样式在复制的图标文件中复制相对应的图标样式必须存在 */
}

@font-face {
	font-family: "iconfont";
	src: url('//at.alicdn.com/t/font_1337773_f06f5a7las.eot?t=1565581133395');
	/* IE9 */
	src: url('//at.alicdn.com/t/font_1337773_f06f5a7las.eot?t=1565581133395#iefix') format('embedded-opentype'),
		/* IE6-IE8 */
		url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAOIAAsAAAAAB8QAAAM7AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDMgqCRIIjATYCJAMUCwwABCAFhG0HZhvNBsiemjwJqJERRCC3tX4YOM4iqNbCnr29uw8wKGBUsUAKqDyCjY5HcEzCALron1wr8wDk8hKBFpIc5yaXfWZJoIBIQkF1KlvVqWuFfZ3c/CBw0p8fcMJJsQY6uIuEMk8188LgXgfHTJceiXlrm0tGajTgaMCz2T6yyf5BXh+Ef9BdxMSIS9cTaKmvYGbzFhRXA1sZ2C0QO7cRAdhadnmkNTSEqufYLM4qNdKx9AJn+M/Hb2OiQVIWwL6rNufIIP1bj29voaZspAiK/byITqLAaEAmdvX6d7KQ+dEstCw2tjQL0FJDkvZald8e//3y+WglCIaW0E/e5R8vERWvuTWY5RYy3/ywXBtKXBEF395EBN++FCQ8V5CWsmEt4CBgHMz1Ad8rde7s2LbD7oUhT3l+eWHbhxwOB+LFrfkVL7I3FIAWdpdWvfHiYt8FltYWdzy1Pz/WfPhQ/elT7efPvUJiVlRsIj8+18X3az7+5Wb48vVrbnvo7OndVe1cPc55k2ebWG7OmMgYX01bT3vJnNlJWtemes0mn3vI/PJl80NQQqVErfcH/Ys5Fy3evrVoyyZNDLSq/cp5EyYsKTbb69bD/+5fmPs/cFwxG9ABoCNdTY+AKrwdi2npHk0Xu4vMH/Q7Wl+4+Yftkv83kMHXTiVutOlsnh68ZYPZit+hmDmRSxVwlDnvxvI8WOq3gz4VCy3xE8Id/d7H2GV2M6Ghi4ak1gcKDYORGTsaSq2Mg0rDTGhplLyTW+mEsRC5BUYadyC0dwpJWw+h0N53ZMb+glJX/6DSPgpoaUN4nLOVobGtZdYuJHAkQ7EbqiVqwMjF7UVrJSKKTmCmitNrETOpUzAiNLxZykMGxPY4wNRBIjnHEDOqh7nOzZBOR6GRUQ2SeKiKc2NiWBju+6JQieqBvbkYRMAhMkjUDVKTUAaYzufsW99fCSEUOgI20rMQr4UwJurloQihwmcg8/SGWT3v8hKTDkQkjsMgjKH0oFzHi+hgnoKM/VtpIBIulGpF1ihRmDcLz9WHnm/Uv0BZNAD40zJSFJGjjEq77dsEg1ahKoF2qbupYvP0KNS2e69WbmucSNZAOpEa5XpUagAAAA==') format('woff2'),
		url('//at.alicdn.com/t/font_1337773_f06f5a7las.woff?t=1565581133395') format('woff'),
		url('//at.alicdn.com/t/font_1337773_f06f5a7las.ttf?t=1565581133395') format('truetype'),
		/* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
		url('//at.alicdn.com/t/font_1337773_f06f5a7las.svg?t=1565581133395#iconfont') format('svg');
	/* iOS 4.1- */
}

.iconfont {
	font-family: "iconfont" !important;
	font-size: 16px;
	font-style: normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.icon-yuandian:before {
	content: "\e64d";
}

.icon-dingweiweizhi:before {
	content: "\e619";
}
/* 时间轴-end */

.pro{
	margin-top: 20rpx;
}
.pro_item{
	width: 150rpx;
	height: 60rpx;
	line-height: 60rpx;
	text-align: center;
	background-color: #1E90FF;
	color: #FFF;
}
.pro_top{
	border-bottom: 1px solid #1E90FF;
}
.pro_content{
	padding: 20rpx;
	border-bottom: 1px solid #E1E1E1;
}
.ptitle{
	font-size: 28rpx;
	line-height: 40rpx;
	color: #000;
}
.ptime{
	font-size: 24rpx;
	line-height: 40rpx;
	color: #333;
}

.bot_item{
	margin: 10rpx 20rpx;
	padding: 10rpx 10rpx;
}
.bot_title{
	margin-left: 20rpx;
	font-size: 28rpx;
	line-height: 60rpx;
}
.bot_desc{
	margin-left: 20rpx;
	font-size: 24rpx;
	line-height: 50rpx;
	color: #AAA9AB;
	width: 70%;
}
	
</style>